<script setup lang="ts">
	import { ref } from 'vue';
	import { onLoad } from '@dcloudio/uni-app';
	import { useNoteTabs } from '@/simba/hooks/note'
	
	// import SimbaTabs from '../components/SimbaTabs/SimbaTabs.vue';
	import type { ITabsItem } from '@/simba/types';
	const { noteTabs, noteTabRef, keyword } = useNoteTabs()
	
	const loadStatus = ref('loadmore')
	
	function onTabsClickHandler(item:ITabsItem){
		console.log(item)
		uni.showToast({
			icon: 'none',
			title: item.id + '---' + item.name
		})
	}
	function addRandomData(){
		console.log('addRandomData')
	}
</script>

<template>
<!-- 	<s-layout
	  title="首页"
	  navbar="custom"
	  tabbar="/pages/index/index"
	  :showTabbar="false"
	  :bgStyle="page"
	  :navbarStyle="navigationBar"
	  onShareAppMessage
	> -->
	<view >
		<siTabs ref="locationTabRef" 
			:list="noteTabs.list" 
			:choosedTab="noteTabs.choosedTab"
			@onTabsClick="onTabsClickHandler"
		>
			<template #content>
				<up-search placeholder="请输入关键词" v-model="keyword" :clearabled="true" ></up-search>
			</template>
		</siTabs>
	</view>
	
	<up-loadmore bg-color="rgb(240, 240, 240)" :status="loadStatus" @loadmore="addRandomData"></up-loadmore>
	<!-- </s-layout> -->
</template>

<style lang="scss" scoped>

</style>
